package net.wanho.controller;

import lombok.RequiredArgsConstructor;
import net.wanho.po.Role;
import net.wanho.service.RoleService;
import net.wanho.vo.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Author：汤小洋
 * Date：2024-10-22 9:21
 * Description：<描述>
 */
@RestController
@RequestMapping("/role")
@RequiredArgsConstructor
public class RoleController {

    private final RoleService roleService;

    @GetMapping("/role-list")
    public R roleList(){
        List<Role> list = roleService.findRoleList();
        return R.success(list);
    }

}
